//
//  BaseViewController.h
//  TalkTalk
//
//  Created by ypj on 2019/3/19.
//  Copyright © 2019 bancheng. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIView+Frame.h"
#import <UIImageView+WebCache.h>
#import <UIButton+AFNetworking.h>
#import <UIButton+WebCache.h>
#import <UIImageView+AFNetworking.h>
#import "ZuLinPrefixHeader.pch"
#import "ResponseClass.h"

NS_ASSUME_NONNULL_BEGIN

@interface BaseViewController : UIViewController<UINavigationControllerDelegate,UIImagePickerControllerDelegate,UITabBarControllerDelegate>
//各种提示框方法
@property (nonatomic, strong) UILabel *customerTitleLabel;//自定义导航栏标题
@property (nonatomic, strong) UIView *barView;
@property (nonatomic, strong) UIImageView *bgImage;
@property (nonatomic, strong) UIButton *leftButton;
@property (nonatomic, strong) YLUserInfo *userInfo;
@property (nonatomic, strong) ResponseClass *response;
@property (nonatomic, strong) UIView *lineView;
typedef void (^getSuccessBlock)(BOOL isSuccess);

/**黑色文字,黑色返回*/
- (void)layoutCustomNav:(UIView *)view title:(NSString *)title;
/**白色文字,白色返回*/
- (void)layoutCustomNavWithWhiteColor:(UIView *)view title:(NSString *)title;

- (void)uploadNavigatinBarFrame;
- (void)backButtonClick:(UIButton *)sender;
-(void)pop;
#pragma mark---- 纯文字提示框
- (void)showMessage:(NSString *)message;
- (void)showEmptyWithIcon:(UIImage *)icon tips:(NSString *)tips;
- (void)showEmptyWithIcon:(UIImage *)icon tips:(NSString *)tips frame:(CGRect)frame;
- (void)showTopErrorView:(NSString *)errerString;
- (void)showErrorView;
- (int)compareDate:(NSString*)date01 withDate:(NSString*)date02;
//获取字符串的高度
- (CGSize)sizeWithStringAndWidth:(CGFloat)width string:(NSString *)string font:(UIFont *)font;
- (CGFloat)getWidthWithText:(NSString *)text height:(CGFloat)height font:(CGFloat)font;
/**
 push到下一个controller
 */
- (void)pushToNextController:(UIViewController *)controller;
- (void)dismiss;
- (void)jumpVC:(UIViewController *)vc;//跳转下一页并销毁当前页面
- (BOOL)deleteAccount;
- (BOOL)ArrayIsALickWithOldArray:(NSMutableArray *)oldArray withNewArray:(NSMutableArray *)newArray;
+ (UIWindow*)getCurrentWindow;
- (void)saveUserInfo:(NSDictionary *)cacheDic;//存储用户信息
- (void)delectImageWithArray:(NSMutableArray *)junkPicturesArray;//批量删除照片
@property(nonatomic ,strong)void(^ToDelectArray)(void);//删除照片暂存数组
@property(nonatomic ,strong)void(^ToRefreshView)(void);//删除照片暂存数组
+ (NSString *)gs_jsonStringCompactFormatForDictionary:(NSMutableDictionary *)dicJson;
+ (id)parseJSONStringToNSDictionary:(NSString *)JSONString;

+ (UIViewController *)getCurrentViewController;

- (void)getUserInfo:(getSuccessBlock)block;//获取个人信息
- (BOOL)isValidateMobile:(NSString *)mobile;  //手机号正则
///图片中带文字转换成没文字
- (NSURL *)strWithImgUrlString:(NSString *)str;

// 退出登录
- (void)loginOut;

// 设置底部按钮
-(void)setBottomViewWithText:(NSString *)text;
-(void)clickBottomView:(UIButton *)sender;
/**获取当前显示的控制器*/
+ (UIViewController *)getCurrentVC;
/**获取相应的字典*/
+ (void)getDicDetailDic;
// 获取状态栏高度
+ (CGFloat)getStatusBarHeight;
/**返回到指定vc*/
- (void)backToVC:(NSString *)vc;
/**获取常用标签*/
+(void)getCompanyLabTags;

@end

NS_ASSUME_NONNULL_END
